
 <script language="javascript">
 $(document).ready(function () {
    initForm('frmreportsummary_tblinfo'); 
    initDivleft();    
});
 var frmreportsummary_cal1 = CreateCalObject('frmreportsummary_fromdate', 'frmreportsummary_imgCal1');
var frmreportsummary_cal2 = CreateCalObject('frmreportsummary_todate', 'frmreportsummary_imgCal2');
var frmreportsummary_cal3 = CreateCalObject('frmreportsummary_dateDelete', 'frmreportsummary_imgCal3');
 frmreportsummary_cal1.time_comp = false;
 frmreportsummary_cal2.time_comp = false;
 frmreportsummary_cal3.time_comp = false;
function frmreportsummary_createReport(){
     
     fromdate = ConvertoDateEN($('#frmreportsummary_fromdate').val());
     todate = ConvertoDateEN($('#frmreportsummary_todate').val());
     changeWaiting(0);
     xajax_frmreportsummary_load(fromdate,todate);  
}

$('#frmreportsummary_fromdate').val(GetCurrentDateTime(0,1,false,0)) ;
$('#frmreportsummary_todate').val(GetCurrentDateTime(0,0,false,2)) ;
$('#frmreportsummary_dateDelete').val(GetCurrentDateTime(0,1,false,2)) ;
function frmreportsummary_run(){
    var dateDelete = $('#frmreportsummary_dateDelete').val();
    if(!isDate(dateDelete)){
        alert('Vui lòng nhập ngày tổng hợp chính xác');
        $('#frmreportsummary_dateDelete').focus();
        return false;
    }
    if(confirm('Chắc chắn chạy tổng hợp ngày '+dateDelete+'?')){
      var dateDelete = ConvertoDateEN(dateDelete);
      xajax_frmreportsummary_run(dateDelete);  
    }
    
}
changeWaiting(0);
frmreportsummary_createReport();
 </script>

<body>
<div class="divmain">
<table width="100%" id="frmreportsummary_tblinfo" class="tblInfo">
<tr>
<td valign="top" class="width25">
<div>
<table class="info" id="frmreportsummary_tblcondition">
 
 <tr>
<td colspan="2">
Ngày chạy tổng hợp 
</td>
</tr>
<tr>
<td >
<input type="text" value="" onblur="formatddmmyyyy(this)" style="width:140px" maxlength="10"  id="frmreportsummary_dateDelete"/>
<a href="javascript:frmreportsummary_cal3.popup();">
<img src="adagps.com/images/cal/cal2.png" id="frmreportsummary_imgCal3"  class="datepicker dpkstart" ></a>
</td>
<td>
<button id="frmreportsummary_btnDelete" onclick="frmreportsummary_run()" class="width100">Chạy tổng hợp</button>
</td>
</tr>

<tr>
<td colspan="2"><hr></td></tr>



<tr >
<td colspan="2">
<div id="frmreportsummary_divleft" class="divleft"> 
<table class="width100" style="background-color:transparent">

 
<tr><td>Từ ngày:</td>
<td><input type="text" value="" onblur="formatddmmyyyy(this)" style="width:140px" maxlength="10"  id="frmreportsummary_fromdate"/><a href="javascript:frmreportsummary_cal1.popup();">
<img src="adagps.com/images/cal/cal2.png" id="frmreportsummary_imgCal1"  class="datepicker dpkstart" ></a>
</td></tr>
<tr>
<td>Đến ngày:</td>
<td>
<input type="text"  value="" onblur="formatddmmyyyy(this)"  id="frmreportsummary_todate" style="width:140px" maxlength="10" /><a href="javascript:frmreportsummary_cal2.popup();">
<img src="adagps.com/images/cal/cal2.png" id="frmreportsummary_imgCal2"    class="datepicker dpkend" ></a>  </td>
</tr>


</table>
    <div class="divactionbuton">

        <button id="frmreportsummary_create" class="bntreport" onclick="frmreportsummary_createReport();" type="button"> Xem </button>
        </div>
</div>
</td>
</tr>  

</table>
</div>
</td>
<td class="clsmiddle"></td>

<td width="80%" height="400" valign="top">
<div class="divGrid" id="frmreportsummary_divGrid">
 
</div></td>
<td class="clsend"></td>
</tr>
</table>
</div>

</body>

